/********************************************************************
 *  (fill this)
********************************************************************/

// `include "AlarmTimeMux.v"
// `include "digDecoder"

module displayTop (
  input   wire        alarm       ,
  input   wire [7:0]  t_hour      ,
  input   wire [7:0]  t_min       ,
  input   wire [7:0]  t_sec       ,

  input   wire [7:0]  a_hour      ,
  input   wire [7:0]  a_min       ,
  input   wire [7:0]  a_sec       ,

  output  wire [7:0]  dig_hour_u  ,
  output  wire [7:0]  dig_hour_l  ,
  output  wire [7:0]  dig_min_u   ,
  output  wire [7:0]  dig_min_l   ,
  output  wire [7:0]  dig_sec_u   ,
  output  wire [7:0]  dig_sec_l   
);

wire [7:0]  mux_hour;
wire [7:0]  mux_min ;
wire [7:0]  mux_sec ;

AlarmTimeMux AlarmTimeMux_inst(
  .alarm      (       alarm           ),
  .t_hour     (       t_hour          ),
  .t_min      (       t_min           ),
  .t_sec      (       t_sec           ),

  .a_hour     (       a_hour          ),
  .a_min      (       a_min           ),
  .a_sec      (       a_sec           ),

  .o_hour     (       mux_hour        ),
  .o_min      (       mux_min         ),
  .o_sec      (       mux_sec         )
);

digDecoder HourUpper (
  .idata      (       mux_hour[7:4]   ),
  .dig        (       dig_hour_u      )
);

digDecoder HourLow (
  .idata      (       mux_hour[3:0]   ),
  .dig        (       dig_hour_l      )
);

digDecoder MinUpper (
  .idata      (       mux_min[7:4]    ),
  .dig        (       dig_min_u       )
);

digDecoder MinLow (
  .idata      (       mux_min[3:0]    ),
  .dig        (       dig_min_l       )
);

digDecoder SecUpper (
  .idata      (       mux_sec[7:4]    ),
  .dig        (       dig_sec_u       )
);

digDecoder SecLow (
  .idata      (       mux_sec[3:0]    ),
  .dig        (       dig_sec_l       )
);


endmodule
